/**
 * GL Laser 首页样式
 */

/* ========================
   Hero 区域
   ======================== */
.gl-hero {
  min-height: 36.25rem;
  background: linear-gradient(135deg, var(--gl-bg-light) 0%, #E6F0FA 100%);
  padding: 3.75rem 5%;
}

.gl-hero-container {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.75rem;
  align-items: center;
}

.gl-hero-content {
}

.gl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,102,204,0.1);
  color: var(--gl-primary);
  padding: 0.5rem 1rem;
  border-radius: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.gl-hero-title {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.gl-hero-title span {
  color: var(--gl-primary);
}

.gl-hero-subtitle {
  font-size: 1.125rem;
  color: var(--gl-text-secondary);
  margin-bottom: 2rem;
}

.gl-hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.gl-hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 0.0625rem solid var(--gl-border);
}

.gl-stat-item {
  text-align: center;
}

.gl-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gl-primary);
}

.gl-stat-label {
  font-size: 0.875rem;
  color: var(--gl-text-secondary);
}

/* ========================
   Hero 轮播图
   ======================== */
.gl-hero-carousel {
  position: relative;
  border-radius: 1rem;
  box-shadow: 0 1.25rem 3.75rem rgba(0,0,0,0.15);
  height: 360px; /* 轮播整体高度 */
  overflow: visible; /* 允许按钮超出边缘 */
}

@media (max-width: 64rem) {
  .gl-hero-carousel {
    height: 300px;
  }
}

@media (max-width: 48rem) {
  .gl-hero-carousel {
    height: 240px;
  }
}

.gl-hero-carousel .carousel {
  margin-bottom: 0 !important;
}

.gl-hero-carousel .carousel-inner,
.gl-hero-carousel .carousel-item {
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
}

.gl-hero-carousel .carousel-inner .carousel-item img {
  width: 100%;
  height: 280px; /* 固定图片高度 */
  object-fit: cover;
}

@media (max-width: 64rem) {
  .gl-hero-carousel .carousel-inner .carousel-item img {
    height: 230px;
  }
}

@media (max-width: 48rem) {
  .gl-hero-carousel .carousel-inner .carousel-item img {
    height: 180px;
  }
}

.gl-hero-carousel .carousel-control-prev,
.gl-hero-carousel .carousel-control-next {
  width: 5rem;
  opacity: 1; /* 默认完全显示 */
  top: 50%;
  transform: translateY(-50%);
  height: auto;
  z-index: 10; /* 确保按钮在最上层 */
}

.gl-hero-carousel .carousel-control-prev {
  left: -2.5rem; /* 向左超出一半宽度 */
}

.gl-hero-carousel .carousel-control-next {
  right: -2.5rem; /* 向右超出一半宽度 */
}

/* 悬停时显示背景 */
.gl-hero-carousel .carousel-control-prev:hover,
.gl-hero-carousel .carousel-control-next:hover {
  opacity: 1;
}

/* 移动端隐藏控制按钮 */
@media (max-width: 48rem) {
  .gl-hero-carousel .carousel-control-prev,
  .gl-hero-carousel .carousel-control-next {
    display: none;
  }
}

.gl-hero-carousel .carousel-control-prev-icon,
.gl-hero-carousel .carousel-control-next-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: #2563EB; /* 主题色 */
  border-radius: 50%;
  padding: 0.75rem;
  background-size: 1rem;
}

.gl-hero-carousel .carousel-control-prev:hover .carousel-control-prev-icon,
.gl-hero-carousel .carousel-control-next:hover .carousel-control-next-icon {
  background-color: #1d4ed8; /* 悬停加深 */
}

.gl-hero-carousel .carousel-indicators {
  position: static;
  margin: 0.5rem 0;
}

.gl-hero-carousel .carousel-indicators button {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  margin: 0 0.25rem;
  opacity: 0.5;
  background-color: #333; /* 黑色 */
  border: none;
}

.gl-hero-carousel .carousel-indicators button.active {
  background-color: #000; /* 纯黑 */
  opacity: 1;
}

/* 轮播标题样式 - 位于图片下方 */
.gl-hero-carousel .carousel-caption {
  position: relative;
  bottom: auto;
  left: auto;
  right: auto;
  padding: 0.75rem 1rem 0.25rem;
  background: none;
  border-radius: 0;
  margin: 0;
  text-align: center;
}

.gl-hero-carousel .carousel-caption p {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 指示器 */
.gl-hero-carousel .carousel-indicators {
  position: static;
  margin: 0.25rem 0 0.5rem;
}

/* ========================
   特色卡片
   ======================== */
.gl-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.gl-feature-card {
  background: var(--gl-bg);
  border: 0.0625rem solid var(--gl-border);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s;
}

.gl-feature-card:hover {
  box-shadow: 0 0.625rem 2.5rem rgba(0,0,0,0.1);
  transform: translateY(-0.25rem);
  border-color: var(--gl-primary);
}

.gl-feature-icon {
  width: 4rem;
  height: 4rem;
  background: linear-gradient(135deg, var(--gl-primary), var(--gl-primary-dark));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  color: white;
  font-size: 1.75rem;
}

.gl-feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.gl-feature-desc {
  font-size: 0.875rem;
  color: var(--gl-text-secondary);
}

/* ========================
   产品卡片
   ======================== */
.gl-products-wrapper {
  position: relative;
}

.gl-products-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.gl-products-grid::-webkit-scrollbar {
  height: 0.25rem;
}

.gl-products-grid::-webkit-scrollbar-track {
  background: var(--gl-border);
  border-radius: 0.125rem;
}

.gl-products-grid::-webkit-scrollbar-thumb {
  background: var(--gl-primary);
  border-radius: 0.125rem;
}

.gl-product-card {
  flex-shrink: 0;
  width: 21.25rem;
  scroll-snap-align: start;
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.75rem rgba(0,0,0,0.07);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.gl-product-card:hover {
  transform: translateY(-0.3rem);
  box-shadow: 0 0.75rem 2rem rgba(0,102,204,0.14);
}

.gl-product-image {
  position: relative;
  height: 14rem;
  flex-shrink: 0;
  overflow: hidden;
  background: #F0F4F8;
}

.gl-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gl-product-card:hover .gl-product-image img {
  transform: scale(1.06);
}

/* 图片 hover 遮罩 */
.gl-product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,102,204,0.3), transparent 50%);
  opacity: 0;
  transition: opacity 0.35s;
}

.gl-product-card:hover .gl-product-image::after {
  opacity: 1;
}

.gl-product-info {
  padding: 1.25rem 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.gl-product-category {
  display: inline-block;
  font-size: 0.6875rem;
  color: var(--gl-primary);
  background: #EEF4FF;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.625rem;
  border-radius: 0.25rem;
  align-self: flex-start;
}

.gl-product-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gl-product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  flex: 1;
  align-content: flex-start;
}

.gl-spec-tag {
  display: inline-block;
  font-size: 0.6875rem;
  color: #4A5568;
  background: #F7FAFC;
  border: 0.0625rem solid #E2E8F0;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  line-height: 1.4;
}

.gl-product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: auto;
  color: var(--gl-primary);
  font-weight: 600;
  font-size: 0.8125rem;
  transition: gap 0.25s;
}

.gl-product-card:hover .gl-product-link {
  gap: 0.5rem;
}

/* ========================
   解决方案横向滚动
   ======================== */
.gl-solutions-grid {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
}

.gl-solutions-grid::-webkit-scrollbar {
  height: 0.25rem;
}

.gl-solutions-grid::-webkit-scrollbar-track {
  background: var(--gl-border);
  border-radius: 0.125rem;
}

.gl-solutions-grid::-webkit-scrollbar-thumb {
  background: var(--gl-primary);
  border-radius: 0.125rem;
}

.gl-solution-card {
  background: white;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 1.25rem rgba(0,0,0,0.08);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  min-width: 21.25rem;
  scroll-snap-align: start;
}

.gl-solution-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 1rem 2.5rem rgba(0,102,204,0.12);
}

.gl-solution-card-img {
  width: 100%;
  height: 11.25rem;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gl-solution-card:hover .gl-solution-card-img {
  transform: scale(1.03);
}

.gl-solution-card-img-wrapper {
  overflow: hidden;
  position: relative;
}

.gl-solution-card-img-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
}

.gl-solution-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gl-solution-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gl-text);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.gl-solution-card-text {
  font-size: 0.8125rem;
  color: var(--gl-text-secondary);
  line-height: 1.6;
  margin: 0 0 0.75rem;
  flex: 1;
}

.gl-solution-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 0.0625rem solid var(--gl-border);
}

.gl-solution-card-tags {
  display: flex;
  gap: 0.375rem;
}

.gl-solution-tag {
  font-size: 0.6875rem;
  color: var(--gl-primary);
  background: #EEF4FF;
  padding: 0.1875rem 0.5rem;
  border-radius: 0.25rem;
}

.gl-solution-card-link {
  color: var(--gl-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s;
}

.gl-solution-card-link:hover {
  color: var(--gl-accent);
}

/* ========================
   解决方案导航按钮
   ======================== */
.gl-solutions-wrapper {
  position: relative;
}

.gl-solutions-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: white;
  border: 0.0625rem solid var(--gl-border);
  box-shadow: 0 0.125rem 0.75rem rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gl-text);
  z-index: 10;
  transition: all 0.2s;
}

.gl-solutions-nav:hover {
  background: var(--gl-primary);
  color: white;
  border-color: var(--gl-primary);
}

.gl-solutions-nav-prev {
  left: -1.375rem;
}

.gl-solutions-nav-next {
  right: -1.375rem;
}

/* ========================
   数据统计
   ======================== */
.gl-stats {
  padding: 3.75rem 5%;
  background: var(--gl-primary);
  color: white;
}

.gl-stats-grid {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  text-align: center;
}

.gl-stats-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gl-stats-label {
  font-size: 1rem;
  opacity: 0.9;
}

/* ========================
   响应式
   ======================== */
@media (max-width: 64rem) {
  .gl-hero-title {
    font-size: 2.25rem;
  }
  .gl-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gl-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gl-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 48rem) {
  .gl-hero {
    padding: 2.5rem 1rem;
  }
  .gl-hero-container {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
  }
  .gl-hero-carousel {
    grid-row: 1; /* 轮播放在第一行 */
  }
  .gl-hero-content {
    width: 100%;
    grid-row: 2; /* 内容放在第二行 */
  }
  .gl-hero-title {
    font-size: 1.75rem;
  }
  .gl-hero-buttons {
    flex-direction: column;
  }
  .gl-btn {
    width: 100%;
    text-align: center;
  }
  /* 移动端轮播适配 */
  .gl-hero-carousel {
    height: 240px;
  }
  .gl-hero-carousel .carousel-inner .carousel-item img {
    height: 180px;
  }
  .gl-hero-carousel .carousel-control-prev,
  .gl-hero-carousel .carousel-control-next {
    height: 180px;
    width: 3rem;
  }
  .gl-hero-carousel .carousel-control-prev {
    left: -1.5rem;
  }
  .gl-hero-carousel .carousel-control-next {
    right: -1.5rem;
  }
  .gl-hero-carousel .carousel-control-prev-icon,
  .gl-hero-carousel .carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    padding: 0.5rem;
  }
  .gl-hero-carousel .carousel-caption p {
    font-size: 0.8125rem; /* 移动端更小字体 */
  }
  .gl-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
  }
  .gl-stat-item {
    width: calc(50% - 0.5rem);
    text-align: center;
  }
  .gl-features-grid {
    grid-template-columns: 1fr;
  }
  .gl-solutions-grid {
    grid-template-columns: repeat(2, 10rem);
  }
  .gl-products-grid {
    grid-template-columns: repeat(2, 10rem);
  }
  .gl-product-card {
    width: 10rem;
  }
  .gl-product-image {
    height: 7.5rem;
  }
  .gl-product-info {
    padding: 0.75rem;
  }
  .gl-product-name {
    font-size: 0.8125rem;
    -webkit-line-clamp: 1;
  }
  .gl-product-category {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }
  .gl-spec-tag {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }
  .gl-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  .gl-stats-number {
    font-size: 2rem;
  }
  .gl-stats-label {
    font-size: 0.8125rem;
    word-break: break-word;
  }
  .gl-solutions-nav {
    display: none;
  }
}
